/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.uet.model;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author thinhnk
 */
public class UsersManager {
    private Map<String, Integer> users = null;
    private UsersManager manager = null;
    private UsersManager(){
        users = new HashMap<String, Integer>();
    }
    public UsersManager instances(){
        if(users == null){
            return new UsersManager();
        }else{
            return manager;
        }
    }
    
    public void putUser(String username, int score){
        users.put(username, score);
    }
    public void removeUser(String username){
        users.remove(username);
    }
    public int getScore(String username){
        return users.get(username);
    }
}
